all:select eclient eselectserv hostname zombie signal\
	remove_zombie empserv empclnt \
	tr1 eepollserv eserver eepollmtserv

select:select.c
	gcc select.c -o select

eclient:echo_client.c
	gcc echo_client.c -o eclient

eserver:echo_server.c
	gcc echo_server.c -o eserver

eselectserv:echo_selectserv.c
	gcc echo_selectserv.c -o eselectserv

hostname:gethostbyname.c
	gcc gethostbyname.c -o hostname

zombie:zombie.c
	gcc zombie.c -o zombie

signal:signal.c
	gcc signal.c -o signal


remove_zombie:
	gcc remove_zombie.c -o remove_zombie

empserv:echo_mpserv.c
	gcc echo_mpserv.c -o empserv

empclnt:echo_mpclient.c
	gcc echo_mpclient.c -o empclnt

tr1:thread1.c
	gcc thread1.c -o tr1 -lpthread

eepollserv:echo_epollserv.c
	gcc echo_epollserv.c  -o eepollserv

eepollmtserv:echo_epollmtserv.c
	gcc echo_epollmtserv.c  -o eepollmtserv -lpthread

.PHONY:clean
clean:
	$(RM) select eclient eselectserv hostname zombie \
	tr1 signal remove_zombie empserv empclnt eepollserv eserver eepollmtserv  *.o
